package com.ztools.pc.controller.information;

import com.ztools.common.model.pc.information.TeacherClasses;
import com.ztools.common.util.common.Result;
import com.ztools.pc.service.information.TeacherClassesService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author:一口香菜
 * @Date: 2023/3/18  20:20
 * @Version 1.0
 */
@RestController
@RequestMapping("/information/teacher/classes")
public class TeacherClassesController {

    @Resource
    private TeacherClassesService teacherClassesService;

    @RequestMapping("/add")
    public Result add(@RequestBody TeacherClasses teacherClasses) {
        boolean b = teacherClassesService.save(teacherClasses);
        return b ? Result.success("添加成功") : Result.error("添加失败");
    }

}
